<?php
defined('IN_ADMIN') or exit('No permission resources.');
include $this->admin_tpl('header');
?>
<body> 
<div class="main_head">
		<span class="main_head_title">管理员管理</span>	
		<a href="?m=admin&c=adminmanage&a=add"><span class="main_head_btn">新&nbsp;&nbsp;增</span></a>	
</div>
<div class="main_wraper">
<table border="0" cellpadding="0" cellspacing="0" class="main_table">
	<thead>
		<tr class="main_table_header">
			<th width="4%">序号</th>
			<th width="5%">用户名</th>
			<th width="10%">角色</th>
			<th width="12%">最后登录IP</th>
			<th width="12%">最后登录时间</th>
			<th width="12%">E-mail</th>
			<th width="10%">真实姓名</th>
			<th width="10%" colspan=2>操作</th>						
		</tr>
	</thead>
	<tbody id = "main_tbody" >
		<?php 
			if(is_array($infos)){
				for($i = 0; $i < count($infos); $i++){
		?>
		<tr>
			<td><?php echo $i+1;?></td>
			<td><?php echo $infos[$i]['username']?></td>
			<td><?php echo $roles[$infos[$i]['roleid']]?></td>
			<td><?php echo $infos[$i]['lastloginip']?></td>
			<td><?php echo $infos[$i]['lastlogintime'] ? date('Y-m-d H:i:s',$infos[$i]['lastlogintime']) :''?></td>
			<td><?php echo $infos[$i]['email']?></td>
			<td><?php echo $infos[$i]['realname']?></td>
			<td><a href="?m=admin&c=adminmanage&a=edit&userid=<?php echo $infos[$i]['userid']?>">修改</a></td>
			<?php if($infos[$i]['userid'] != 1){?>
			<td><a href="javascript:confirmurl('?m=admin&c=adminmanage&a=delete&userid=<?php echo $infos[$i]['userid']?>','确定删除？')">删除</a></td>
			<?php } else{?>
			<td ><font color="#cccccc">删除</font></td>
			<?php }?>
		</tr>
		<?php 
			}
				}?>
	</tbody>
</table>
</div>
<div class="main_foot_wraper">

</div>
</body>
</html>